package com.example.mvpdemo.demo;

import android.os.Handler;
import android.util.Log;

import com.example.mvpdemo.dao.model.User;
import com.example.mvpdemo.base.BasePresenter;

public class MainPresenter extends BasePresenter<MainContract.MainView> implements MainContract.MainPresenter {

    private static final String TAG = "MainPresenter";

    @Override
    public void getUserData() {
        Log.e(TAG, mContext.getClass().toString());
        mView.showDialog("请稍后", false);
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                User user = new User();
                user.setName("张无忌");
                user.setId("1");
                if (mView != null) {
                    mView.loadUserSucc(user);
                }
            }
        }, 5000);
    }

}
